package pri.damai.xiaowu.order.server.api.dubbo;

import org.apache.dubbo.config.annotation.DubboService;
import pri.damai.xiaowu.common.core.vo.ResultVO;
import pri.damai.xiaowu.order.client.OrderRpcClient;
import pri.damai.xiaowu.order.common.dto.CreateOrderDTO;
import pri.damai.xiaowu.order.server.service.impl.OdrOrderServiceImpl;

import javax.annotation.Resource;

/**
 *
 * @Desc
 * @Author yxf
 * @Date 2022/4/30 19:56
 * 但行好事，莫问前程。
 */
@DubboService
public class OrderRpcService implements OrderRpcClient {

    @Resource
    OdrOrderServiceImpl odrOrderService;

    @Override
    public ResultVO<Void> createOrder(CreateOrderDTO createOrderDTO) {
        odrOrderService.createOrder(createOrderDTO);
        return ResultVO.success();
    }
}
